package com.ruoyi.material.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.material.mapper.MaterialStockMapper;
import com.ruoyi.material.domain.MaterialStock;
import com.ruoyi.material.service.IMaterialStockService;

/**
 * 库存管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-23
 */
@Service
public class MaterialStockServiceImpl implements IMaterialStockService 
{
    @Autowired
    private MaterialStockMapper materialStockMapper;

    /**
     * 查询库存管理
     * 
     * @param stockId 库存管理主键
     * @return 库存管理
     */
    @Override
    public MaterialStock selectMaterialStockByStockId(Long stockId)
    {
        return materialStockMapper.selectMaterialStockByStockId(stockId);
    }

    /**
     * 查询库存管理列表
     * 
     * @param materialStock 库存管理
     * @return 库存管理
     */
    @Override
    public List<MaterialStock> selectMaterialStockList(MaterialStock materialStock)
    {
        return materialStockMapper.selectMaterialStockList(materialStock);
    }

    /**
     * 新增库存管理
     * 
     * @param materialStock 库存管理
     * @return 结果
     */
    @Override
    public int insertMaterialStock(MaterialStock materialStock)
    {
        return materialStockMapper.insertMaterialStock(materialStock);
    }

    /**
     * 修改库存管理
     * 
     * @param materialStock 库存管理
     * @return 结果
     */
    @Override
    public int updateMaterialStock(MaterialStock materialStock)
    {
        return materialStockMapper.updateMaterialStock(materialStock);
    }

    /**
     * 批量删除库存管理
     * 
     * @param stockIds 需要删除的库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialStockByStockIds(Long[] stockIds)
    {
        return materialStockMapper.deleteMaterialStockByStockIds(stockIds);
    }

    /**
     * 删除库存管理信息
     * 
     * @param stockId 库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialStockByStockId(Long stockId)
    {
        return materialStockMapper.deleteMaterialStockByStockId(stockId);
    }
}
